package com.example.demo.mapper;

import com.example.demo.domain.student;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author
 * @create 86153-2021
 */
@Mapper
@Repository
public interface UserMapper {
    @Select("select  * from student ")
    public List<student> findAll();

    @Select("Select * from student where id<#{a}")
    public List<student> findAboutId(int a);

    @Update("UPDATE student SET NAME='佘凯' WHERE id=9")
    public void updateId();

    @Update("UPDATE student SET NAME=#{'stringName'} WHERE id=10")
    public void updateName(String stringName);

    @Insert("INSERT INTO student VALUE(9,'shdgfbubfusf',123,'sjfhhvievu')")
    public void insertValues();

    @Select("select * from student where student.id>14")
    public List<student> selectName();

    @Delete("delete  from student where student.id=9")
    public void deleteId();


}



